<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title><?php //echo $title_for_layout ?> - Acácia flores</title>
        <?php echo $this->Html->css(array('estilo')); ?>
        <?php echo $this->Html->script(array('jquery')); ?>

    </head>
    <body>
        <div class="geral">
            <div id="topo">
                <div id="menu">
                    <ul>
                        <li><a href="<?php echo Dispatcher::baseUrl() ?>">Home</a></li>
                        <li><a href="<?php echo Dispatcher::baseUrl() ?>/empresa">A Empresa</a></li>
                        <li><a href="<?php echo Dispatcher::baseUrl() ?>/entrega">Entrega</a></li>
                        <li><a href="<?php echo Dispatcher::baseUrl() ?>/contato">Contato</a></li>
                        <li><a href="<?php echo Dispatcher::baseUrl() ?>/clientes/cadastro">Cadastre-se</a></li>
                        <li><a href="<?php echo Dispatcher::baseUrl() ?>/clientes/login">Login</a></li>
                    </ul>
                </div>
                <div id="busca">
                    <form id="PesquisaForm" action="<?php echo Dispatcher::baseUrl() ?>/produtos/pesquisa" method="POST">
                        <input type="text" id="nome_produto" name="nome_produto" onKeyPress="return submitenter(this,event)" onblur="if (this.value == '') {this.value = 'Digite o que voc&ecirc; procura aqui...';}" onfocus="if (this.value == 'Digite o que voc&ecirc; procura aqui...') {this.value = '';}" value="Digite o que voc&ecirc; procura aqui..." />
                    </form>
                </div>
            </div>
            <div id="conteiner">
                <div id="esquerda">
                    <div id="logomarca"></div>
                    <a class="meu_carrinho" href="<?php echo Dispatcher::baseUrl() ?>/carrinho">Meu carrinho</a>
                    <div id="categorias">
                        <ul>
                            <?php 
                            if (!empty($categorias) and count($categorias) > 0): ?>
                            <table width="100%" class="tabela-padrao">
                                <tbody>
                                    <?php
                                    foreach ($categorias as $categoria):
                                        echo "<li><a href=\" ".Dispatcher::baseUrl()."/produtos/categoria/" .$categoria["Categoria"]["id"]." \">" . $categoria["Categoria"]["nome"] . "</a></li>";
                                    endforeach;
                                    ?>        
                                </tbody>
                            </table>
                            <?php else: ?>
                            Nenhuma categoria cadastrada
                            <?php endif; ?>
                        </ul>
                    </div>
                </div>
                <div id="direita">
                    <?php echo $content_for_layout ?>
                </div>
            </div>
        </div>
        <SCRIPT TYPE="text/javascript">

            function submitenter(myfield,e)
            {
                var keycode;
                if (window.event) keycode = window.event.keyCode;
                else if (e) keycode = e.which;
                else return true;

                if (keycode == 13)
                {
                    
                    $('#PesquisaForm').submit();
                    return false;
                }
                else
                    return true;
            }

        </SCRIPT>
    </body>
</html>
